//
//  Logistics_HeaderTableViewCell.swift
//  Pods
//
//  Created by eme on 2017/4/5.
//
//

import UIKit

class Logistics_HeaderTableViewCell: UITableViewCell {
    @IBOutlet weak var good_ImageView: UIImageView!     //商品图片
    
    @IBOutlet weak var wuliu_Status: UILabel!           //物流状态
    
    @IBOutlet weak var YDBH_label: UILabel!             //运单编号
    
    @IBOutlet weak var WLGS_Label: UILabel!             //物流公司
    
    @IBOutlet weak var num_Label: UILabel!              //订单商品数量
    
    @IBOutlet weak var copy_Button: UIButton!           //复制按钮
    
    @IBOutlet weak var leftWL_Label: UILabel!
    
    @IBOutlet weak var leftBH_Label: UILabel!
    
    @IBOutlet weak var leftGS_Label: UILabel!
    
    var item:LogisticsModel! = nil{
        didSet{
            if let model = item{
                self.good_ImageView.setUrlImage(model.img1)
                self.YDBH_label.text = model.logisticsnumber
                self.WLGS_Label.text = model.logisticsname
                
            }
        }
    }
    var status:String! = nil{
        didSet{
            print(status)
            if let deliverystatus = status{
                if deliverystatus == "1"{
                    self.wuliu_Status.text = "在途中"
                }else if deliverystatus == "2"{
                    self.wuliu_Status.text = "派件中"
                }else if deliverystatus == "3"{
                    self.wuliu_Status.text = "已签收"
                }else{
                    self.wuliu_Status.text = "获取物流失败"
                }
                
                
            }
        }
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        self.num_Label.isHidden = true
        self.copy_Button.layer.borderWidth = 1
        self.copy_Button.layer.borderColor = UIColor(hex: "999999").cgColor
        self.copy_Button.layer.masksToBounds = true
        self.copy_Button.layer.cornerRadius = 4
        wuliu_Status.normal_fontSize(14)
        YDBH_label.normal_fontSize(14)
        WLGS_Label.normal_fontSize(14)
        leftBH_Label.normal_fontSize(15)
        leftGS_Label.normal_fontSize(15)
        leftWL_Label.normal_fontSize(15)
        num_Label.normal_fontSize(13)
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
